package com.example.chat.repository;

import com.example.chat.model.Role;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

/**
 * @Description
 * @Date 2022/11/17 11:29
 * @Author pq
 */
public interface RoleRepository extends JpaRepository<Role,String> {
    Optional<Role> findByIdAndDeletedIsFalse(String roleId);

    Optional<Role> findByNameAndDeletedIsFalse(String roleName);
}
